package cn.wolfcode.trip.base.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.Date;

@Getter@Setter@ToString
public class Praise extends BaseDomain {
    public static final Integer TYPE_TRAVEL = 1;//游记
    public static final Integer TYPE_STRATEGY = 2;//攻略
    public static final Integer TYPE_NEWS = 3;//日报
    public static final Integer TYPE_STRATEGY_COMMENT = 4;//攻略点评
    public static final Integer TYPE_FRIENDSHIP = 5;//朋友圈

    private User praiseUser;//点赞人

    private Travel travel;//点赞的游记

    private StrategyComment comment;//点赞的点评

    private Friendship friendship;//点赞的朋友圈

    private FriendshipPraise friendshipPraise;//点赞的朋友圈的中间表

    private Integer type = Praise.TYPE_TRAVEL;//类型

    private Boolean state = false;//是否已读,默认未读

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;//点赞时间
}